from typing import List

from fastapi import Form
from pydantic import BaseModel

headers = {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
    "Host": "bjrbdzb.bjd.com.cn",
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'

}


class UpdateHtml(BaseModel):
    cid: str
    keyid: str
    html: str
    down_date: str


class PaperBeiJingRiBaoSaveStepOne(BaseModel):
    periodDate: str = ''
    html: str = ''
    url: str = ''
    years: str = ''
    moths: str = ''
    downdate: str = ''


class PaperBeiJingRiBaoSaveMonth(BaseModel):
    periodMonth: str = ''
    html: str = ''
    downdate: str = ''


class PaperBeiJingRiBaoSaveStepFour(BaseModel):
    rawid: str = ''
    html: str = ''
    jsondicts: dict = dict()
    downdate: str = ''


class PaperBeiJingRiBaoSaveStepFourParse(BaseModel):
    djson: dict = dict()


class PaperBeiJingRiBaoModel(BaseModel):
    versions_title: str = ''
    days: str = ''
    cid: str = ''
    years: str = ''
    stat: int = 0
    stathtml: int = 0
    versions_url: str = ''
    jsondicts: dict = dict()
    days_url: str = ''
    moths: str = ''


class PaperBeiJingRiBaoForm(BaseModel):
    periodDate: str = ''
    marks: List[str] = []


class PaperBeiJingRiBaoGetDay(BaseModel):
    periodMonth: str = ''
    marks: List[str] = []


class PaperBeiJingRiBaoArticle(BaseModel):
    periodDate: str = ''
    title: str = ''
    url: str = ''
    marks: List[str] = []


class PaperBeiJingRiBaoParseStepFour(BaseModel):
    downdate: str = ''
    jsondicts: dict = dict()
    html: str = ''
    rawid: str = ''
    batch: str = ''


class BjrbParseHtmlModel(BaseModel):
    periodDate: str = ''
    html: str = ''
